
enum enum_paratype = {
    pt_null,
    pt_number,
    pt_float,
    pt_string,
}

typedef enum_paratype paratype;


#define MAXLENGTH_SECTIONNAME 32
#define MAXLEGNTH_OPTIONNAME 32
#define MAX_SECTION 32
#define MAX_OPTION 32

#define MODTYPE_NET   1
#define MODTYPE_TIME  2

struct stt_config_section {
    
    char section_name[MAXLENGTH_SECTIONNAME];
    
    int mod_type;
    ev_io ioe;
    void* cb_net;
    void* cb_time;
    
    int option_count;
    char option_name[MAX_OPTION][MAXLEGNTH_OPTIONNAME];
    
    paratype types[MAX_OPTION];
    int  offset[MAX_OPTION];
    
    void* st_config;
}

typedef stt_config_section section;

section g_config_section[MAX_SECTION];

int set_config_number( char* section , char* option, long inp );
int set_config_float( char* section, char* option, double inp );
int set_config_string( char* section, char* option, char* inp );

#define set_config( section, option, inp ) set_config_##type(inp)( section, option, inp )
